package com.ruoyi.common.enums;

public enum AttendanceTime {
    THREE_MINS(0L, 3),
    FIVE_MINS(1L, 5),
    TEN_MINS(2L, 10);

    private final Long code;
    private final Integer info;

    AttendanceTime(Long code, Integer info) {
        this.code = code;
        this.info = info;
    }

    public Long getCode() {
        return code;
    }

    public int getInfo() {
        return info;
    }

    public static AttendanceTime getAttendanceTimeByCode(Long code) {
        for (AttendanceTime time : AttendanceTime.values()) {
            if (time.getCode().equals(code)) {
                return time;
            }
        }
        return null;
    }
}
